if not lib then


if not ScriptsRootPath then
	ScriptsRootPath = getScriptPath() .. "\\..\\"
end


math.randomseed(os.time())

lib = {
}


dofile (ScriptsRootPath .. "lib\\lib.path.lua")
dofile (ScriptsRootPath .. "lib\\lib.message.lua")
dofile (ScriptsRootPath .. "lib\\lib.number.lua")
dofile (ScriptsRootPath .. "lib\\lib.string.lua")
dofile (ScriptsRootPath .. "lib\\lib.table.lua")
dofile (ScriptsRootPath .. "lib\\lib.time.lua")
dofile (ScriptsRootPath .. "lib\\lib.format.lua")
dofile (ScriptsRootPath .. "lib\\lib.file.lua")
dofile (ScriptsRootPath .. "lib\\lib.semafore.lua")
dofile (ScriptsRootPath .. "lib\\lib.item.lua")
dofile (ScriptsRootPath .. "lib\\lib.info.lua")
dofile (ScriptsRootPath .. "lib\\lib.param.lua")
dofile (ScriptsRootPath .. "lib\\lib.instrument.lua")
dofile (ScriptsRootPath .. "lib\\lib.risk.lua")
dofile (ScriptsRootPath .. "lib\\lib.level2.lua")
dofile (ScriptsRootPath .. "lib\\lib.chart.lua")
dofile (ScriptsRootPath .. "lib\\lib.label.lua")
dofile (ScriptsRootPath .. "lib\\lib.ds.lua")
dofile (ScriptsRootPath .. "lib\\lib.candle.lua")
dofile (ScriptsRootPath .. "lib\\lib.quote.lua")


lib.global = lib:LoadIni(lib.path.init .. "global.ini", nil, {
	all_assets = 5000000,
	liquidity_limit = 500000000,
	instruments_limit = 60,
	class_codes = {
		TQBR = true,
		TQTF = true,
		SPBFUT = true,
		SPBOPT = true,
		FUOP = true
	},
	file_ttl = 20,	-- sec
	first_chart_tab = 3,
	message_level = 1,
	instrument_base_of = false,
	test_accounts = {
		["11123"] = true,
	},
})

if lib:IsTest() then
	lib.global.class_codes.QJSIM = true
end


end -- of file
